import React, { useEffect, useState } from "react"

function useSearch(props) {
  const [isStart, setIsStat] = useState(false)
  console.log(props)
  useEffect(() => {
    const itmer = setTimeout(() => {
      if (!props) {
        setIsStat(true)
      }
    }, 2000)
    return () => {
      clearInterval(itmer)
    }
  }, [])
  return isStart
}

export default useSearch
